//  Abstract:
//    Startup routine
//
//  Reference:
//
//  Design Notes:
//
//  Disclaimer:
//    Copyright (C) 2008, Janice Law <janicel700@gmail.com>.
//
//    This program is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
//
#include <libglademm.h>
#include <gtkmm.h>
#include "gopsed-mainwindow.h"

int main(int argc, char* argv[])
{
    Gtk::Main kit(argc, argv);
    ustring fileName = PACKAGE_DATA_DIR;
    fileName = fileName + "/gopsed.glade";
    Glib::RefPtr<Gnome::Glade::Xml> gopsed_glade =
            Gnome::Glade::Xml::create(fileName);
    gopsed::MainWindow* main_window;
    gopsed_glade->get_widget_derived("window1", main_window);
    if(argc == 2) main_window->LoadFile(argv[1]);
    kit.run(*main_window);
    delete main_window;
    return 0;
}
